package com.ecoolex.ying.space.ws;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.entity.GoodsCategory;
import com.ecoolex.ying.space.pojo.QueryGoodsCategoryDTO;

import java.util.List;

public interface GoodsCategoryService {

    GoodsCategory addCategory(GoodsCategory record, String createUser) throws BizException;

    GoodsCategory updateCategory(GoodsCategory record, String updateUser) throws BizException;

    void deleteCategory(GoodsCategory record, String updateUser) throws BizException;

    GoodsCategory getCategoryById(Integer categoryId);

    List<GoodsCategory> queryCategoryByParentId(Integer parentCategoryId, Boolean isShow);

    Pagination<GoodsCategory> queryCategory(QueryGoodsCategoryDTO query, Sorting[] sorts, Page page);
    
    Pagination<GoodsCategory> queryCategoryForH5(Integer parentCategoryId, Page page);

    GoodsCategory showCategory(GoodsCategory record, String updateUser);

    GoodsCategory hideCategory(GoodsCategory record, String updateUser);

}
